/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package dao;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import mappingOfObject.Oferta;
import mappingOfObject.Sucursal;

/**
 *
 * @author felipe
 */
public class DaoOferta {

    public static Date stringToDate(String stringDate, int tipo){
    	SimpleDateFormat format=null;
        if(tipo==0){
        	format = new SimpleDateFormat("yyyy-MM-dd");
        }
        else{
        	format = new SimpleDateFormat("hh:mm:ss");
        }
        Date date = null;
        try {
            date = format.parse(stringDate);
        } catch (ParseException ex) {
            ex.printStackTrace();
        }
        return date;
    }

}
